{% extends "base.html" %}

{% from  'bootstrap/pagination.html' import render_pagination with context %}


{% block main_content %}

    <div class="row">

        <form action="/flow/log/1/" class="form-inline">
            <div class="form-group">
                <input name="tid" type="text" class="form-control" placeholder="">
            </div>
            <button type="submit" class="btn btn-default">Query</button>
        </form>
{% if data %}
        <table class="table">
                    <thead>
                    <tr>
                        <th>Task ID</th>
{#                        <th>Process ID</th>#}
                        <th>Create Date</th>
                        <th>View </th>
                    </tr>
                    </thead>
            <tbody>
            {% for item in data %}
                <tr>
                    <td>{{ item.tid }}</td>
{#                    <td>{{ item.fid }}</td>#}
                    <td>{{ item.create_date }}</td>
                    <td>
                        <a href="/flow/log/view/{{ item.id }}/">
                            <span class="glyphicon glyphicon-info-sign"></span>
                        </a>
                    </td>
                </tr>
            {% endfor %}
            </tbody>


        </table>
        <div class="row">
            {% call render_pagination(paginate,endpoint='flow.log',args=paginate_args) %}
            {% endcall %}
        </div>
    {% else %}
           <div class="jumbotron">
                    <h3>没有数据</h3>
                    <p>&nbsp;</p>
                </div>
    {% endif %}
    </div>

{% endblock %}